package com.caine.object;

import org.openjdk.jol.info.ClassLayout;


/**
 * -XX:+/-UseCompressedOops 字节压缩,压缩kclass指针
 * 对象组成
 * 对象头+实例数据+填充
 *
 * markword:8
 * kclass pointer:4
 * array length:4
 * data: 8(4 * 2)
 * padding:0
 */
public class ArrayObjectApplication {
    static int[] array = new int[2];
    public static void main(String[] args) {
        System.out.println(ClassLayout.parseInstance(array).toPrintable());
    }
}
